<div>
	<div id="page-heading" style="float:left;"><h1><?php echo lang('regions.grid'); ?></h1></div>
	<div style="float:right; padding-right:30px; font-size:14px; font-weight:bold;"><a href="<?php echo site_url('admin/catalog/regions')?>"><?php echo lang('regions.regions_title')?></a></div>
	<div style="clear:both;"></div>
</div>
<?php $this->load->view('partials/notices'); ?>
<?php if ($catalog_regions): ?>
<table cellspacing="0" cellpadding="0" border="0" width="100%" id="product-table">
				<tbody>
				<tr>
					<th class="table-header-check"><a id="toggle-all" ></a> </th>
					<th class="table-header-repeat line-left"><a href="javascript:void(0);"><?php echo lang('regions.name_label'); ?></a></th>
					<th class="table-header-repeat line-left"><a href="javascript:void(0);"><?php echo lang('regions.slug_label'); ?></a></th>
					<th class="table-header-repeat line-left"><a href="javascript:void(0);"><?php echo lang('regions.created_label'); ?></a></th>
					<th class="table-header-repeat line-left"><a href="javascript:void(0);"><?php echo lang('global:actions')?></a></th>
				</tr>
				<?php foreach ($catalog_regions as $key => $region): ?>
				<tr <?php if($key%2 == 0):?>class="alternate-row"<?php endif;?>>
					<?php if (group_has_role('catalog', 'delete_region')): ?>
						<td><?php echo form_checkbox('action_to[]', $region->id); ?></td>
					<?php endif; ?>
					<td><?php echo anchor('admin/catalog/edit_region/' . $region->id, repeater('&raquo; ', $region->depth) . def_lang($region, 'name'), 'title="' . def_lang($region, 'name') .'" data-path="' . $region->virtual_path . '" class="folder-hash"'); ?></td>
					<td><?php echo $region->slug; ?></td>
					<td><?php echo format_date($region->date_added); ?></td>
					<td class="options-width">
					<?php if (group_has_role('catalog', 'edit_region')): ?>
						<?php echo anchor('admin/catalog/edit_region/' . $region->id, ' ', 'title="'. lang('buttons.edit').'" class="icon-1 info-tooltip"'); ?>
						<?php endif; ?>
						<?php if (group_has_role('catalog', 'delete_region')): ?>
						<?php echo anchor('admin/catalog/delete_region/' . $region->id, ' ', 'title="'. lang('buttons.delete').'" class="icon-2 info-tooltip"'); ?>
						<?php endif; ?>
					</td>
				</tr>
				<?php endforeach;?>
				</tbody>
</table>
<?php else: ?>
	<div class="no_data file-regions">
		<p><?php echo lang('regions.no_regions');?></p>
		<br />
		<br />
		<p>[<?php echo anchor('admin/regions/create', lang('files.upload_label'), 'class="button folder-create"'); ?>]</p>
	</div>
<?php endif; ?>